<?php

declare(strict_types=1);

namespace App\Request;


use App\Model\Channel;

class ChannelRequest extends BaseRequest
{

    public $data;

    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        $pathRulesArr = [
            'channel/list' => [
                'channelType' => 'nullable|integer|in:'. implode(',', array_keys(Channel::$channelTypeDesc)),
                "page"        => "nullable|integer",
                "size"        => "nullable|integer",
            ],
        ];

        return $this->handlePathRules($pathRulesArr);
    }

    public function messages(): array
    {
        return array_merge(parent::messages());
    }
}
